<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {//创建users表
            $table->increments('uid');
            //用户名
            $table->string('name')->default('');
            //电子邮箱
            $table->string('email')->default('');
            //手机号
            $table->string('mobile',11)->default(11000000000);
            //用户密码
            $table->string('password',60)->default(000000);
            //注册时间
            $table->integer('regtime')->default(0);
            //上次登录时间
            $table->integer('lastlogin')->default(0);
            //记录用户cookie
            $table->rememberToken('rember_token');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('users');
    }
}
